﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ThanhTu.GNC.Media.KQXS.DataAccess.DAL;
using ThanhTu.GNC.Media.KQXS.DataAccess.DO;
using System.Data;

namespace ThanhTu.GNC.Media.KQXS.DataAccess.BL
{
    public class PredictedBL : IDisposable
    {
        private PredictedDAL vPredictedDAL = null;
        private bool disposed = false;
        public PredictedBL()
        {
            if (vPredictedDAL == null)
            {
                vPredictedDAL = new PredictedDAL();
            }
        }
        ~PredictedBL() { Dispose(false); }

        #region IDisposable Members

        public void Dispose()
        {
            Dispose(true);
            GC.SuppressFinalize(this);
        }

        private void Dispose(bool disposing)
        {
            if (!disposed)
            {
                if (disposing)
                {
                    if (vPredictedDAL != null)
                    {
                        vPredictedDAL.Dispose();
                        vPredictedDAL = null;
                    }
                }

                disposed = true;
            }
        }

        #endregion

        public int SavePredicted(PredictedDO vPredictedDO) { return vPredictedDAL.SavePredicted(vPredictedDO); }
        public DataTable GetPredicted(DateTime Predicted_date, string provinceID, string style) { return vPredictedDAL.GetPredicted(Predicted_date, provinceID, style); }
        public DataTable GetALLPredicted(DateTime Predicted_date, string provinceID, string style) { return vPredictedDAL.GetALLPredicted(Predicted_date, provinceID, style); }
    }
}
